﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using LDSP.BRL;
using LDSP.Util.Constants;
using System.IO;
using System.Web;

namespace LDSP.Util
{
    public class TemplateFactory
    {
        public static string GetCustomTemplateFolderByType(TemplateType type)
        {
            string folder = string.Empty;
            switch (type)
            {
                case TemplateType.适用法规:
                    {
                        folder = "~/Templates/UserSpecified/FavoriteCodification";
                        break;
                    }
                case TemplateType.适用标准:
                    {
                        folder = "~/Templates/UserSpecified/FavoriteStandard";
                        break;
                    }
                case TemplateType.任务计划:
                    {
                        folder = "~/Templates/UserSpecified/Plan";
                        break;
                    }
                default: break;
            }
            return folder;
        }

        public static string GetDefaultTemplateFileByType(TemplateType type)
        {
            string file = string.Empty;
            switch (type)
            {
                case TemplateType.适用法规:
                    {
                        file = "~\\Templates\\Codification\\FavorateCodification.xls";
                        break;
                    }
                case TemplateType.适用标准:
                    {
                        file = "~\\Templates\\Codification\\FavorateStandard.xls";
                        break;
                    }
                case TemplateType.任务计划:
                    {
                        file = "~\\Templates\\TaskPlan.xls";
                        break;
                    }
                default: break;
            }

            return file;
        }
    }
}
